package com.lqzs.businessmanager.ui.main

import android.os.Bundle
import android.view.View
import androidx.recyclerview.widget.LinearLayoutManager
import com.lqzs.businessmanager.Config
import com.lqzs.businessmanager.R
import com.lqzs.businessmanager.adapter.BusinessAdapter
import com.lqzs.businessmanager.base.BaseFragmentK
import com.lqzs.businessmanager.bean.response.LoginShopResponse
import com.lqzs.businessmanager.dao.AccessDao
import com.lqzs.businessmanager.dao.AccessDataBase
import com.lqzs.businessmanager.databinding.FragmentBusinessBinding
import com.lqzs.businessmanager.ui.main.vm.FragmentViewModel
import com.lqzs.businessmanager.ui.main.vm.MainViewModel
import com.lqzs.businessmanager.utils.PreferencesUtil
import com.lqzs.businessmanager.utils.isOpenAccessibility

private const val ARG_PARAM1 = "param1"
private const val ARG_PARAM2 = "param2"

class BusinessFragment : BaseFragmentK<FragmentBusinessBinding,FragmentViewModel>(R.layout.fragment_business) {
    private var param1: String? = null
    private var param2: String? = null
    lateinit var accessDao: AccessDao
    lateinit var mAdapter: BusinessAdapter
    private val mList: MutableList<LoginShopResponse> = mutableListOf()

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
//        arguments?.let {
//            param1 = it.getString(ARG_PARAM1)
//            param2 = it.getString(ARG_PARAM2)
//        }
    }

    override fun initView(inflateView: View?, savedInstanceState: Bundle?) {
        activity?.let {

        }

    }

    override fun onHiddenChanged(hidden: Boolean) {
        super.onHiddenChanged(hidden)


    }

    override fun createViewBinding(view: View) = FragmentBusinessBinding.bind(view)

    override fun createViewModel() = FragmentViewModel()

    companion object {

        @JvmStatic
        fun newInstance(/*param1: String, param2: String*/) =
            BusinessFragment().apply {
//                arguments = Bundle().apply {
//                    putString(ARG_PARAM1, param1)
//                    putString(ARG_PARAM2, param2)
//                }
            }
    }
}